#include<iostream>
using namespace std;
typedef struct {
	int weight;
	int parent;
	int lchild, rchild;
}HTNode,*HuffmanTree;
void CreateHuffmanTree(HuffmanTree& HT, int n) {
	int m = 2 * n - 1;
	HT = new HTNode[m + 1];
	for (int i = 1; i <= n; i++) {
		HT[i].parent = 0;
		HT[i].lchild = 0;
		HT[i].rchild = 0;
	}
	for (int i = 1; i <= n; i++) {
		cin >> HT[i].weight;
	}
	for (int i = n + 1; i <= m; i++) {

	}
}